<template>
  <!-- 页面导航组件 -->
  <nav>
    <RouterLink to="/home">首页</RouterLink>
    <RouterLink to="/category">分类</RouterLink>
    <RouterLink to="/cart">购物车</RouterLink>
    <RouterLink to="/mine">toref和toRefs</RouterLink>
    <RouterLink to="/nexttick">nexttick的使用</RouterLink>
    <RouterLink to="/computed">computed的使用</RouterLink>
    <RouterLink to="/life">生命周期</RouterLink>
    <RouterLink to="/watch">watch监听器</RouterLink>
    <RouterLink to="/father">父子通信</RouterLink>
    <RouterLink to="/kuaji">跨级组件通信</RouterLink>
    <RouterLink to="/xiongdi">兄弟组件通信</RouterLink>
    <RouterLink to="/directive">自定义指令</RouterLink>
    <RouterLink to="/hook">组合式函数</RouterLink>
    <RouterLink to="/router">组合式api使用编程式导航</RouterLink>
    <RouterLink to="/pinia">操作pinia 仓库</RouterLink>
  </nav>
  <!-- 一级路由的坑 -->
  <RouterView />
</template>
<script setup>
import { RouterLink, RouterView } from 'vue-router'
</script>

<style scoped>
a {
  margin: 5px;
}
</style>
